Kanzi 3.9.10
kanzi::ActivityHostConcept Class Referenceabstract

Base class for Activity Host classes. More...

#include <kanzi/ui/node/concept/activity/activity_host_concept.hpp>

Inheritance diagram for kanzi::ActivityHostConcept:
[legend]

Classes

struct  ActivatingActivity
 Class to manage storing and switching of Activity nodes. More...
 
class  ActivationMessageArguments
 Message arguments for ActivateActivity and DeactivateActivity messages. More...
 
struct  ActiveActivity
 Class to manage storing and switching of Activity nodes. More...
 
struct  ActivityInfo
 Stores information that identifies an Activity node. More...
 
class  ActivityPrefabMessageArguments
 Message arguments for ActivityPrefabAttachedMessage and ActivityPrefabDetachedMessage. More...
 
struct  DeactivatingActivity
 Class to manage storing and switching of Activity nodes. More...
 
class  RegisterActivityElementInternalMessageArguments
 Message arguments for RegisterActivityElementInternal message. More...
 
class  UnregisterActivityElementInternalMessageArguments
 Message arguments for UnregisterActivityElementInternal message. More...
 

Public Types

enum class  ActivationStatus { PreparingForActivation , ParallelAnimation , ExclusiveAnimation }
 Specifies possible stages for internal tracking of activation of an Activity. More...
 
using ActivityInfoContainer
 
enum class  DeactivationStatus { ExclusiveAnimation , ParallelAnimation , WaitingForRelease }
 Specifies possible stages for internal tracking of deactivation of an Activity. More...
 

Public Member Functions

virtual vector< string > getActivatingNames ()=0
 Returns the names of activating Activities in this Activity Host.
 
virtual void onActivateActivityOverride (string_view activationPath, bool resetHistory)=0
 Derived classes implement this method to react to ActivateActivity message.
 
virtual void resolveFocusWithPolicy (Node &activityNode)=0
 Focuses a given Activity if the focusing policy of this Activity Host instructs so.
 
virtual void setActivationModifier (string_view activityName, BindingTokenWeakPtr weakModifier)=0
 Sets a property modifier to apply activation to a child Activity Node of an Activity Host.
 
virtual ~ActivityHostConcept ()=default
 Destructor.
 

Static Public Member Functions

template<typename Type >
static bool isActivityHost (const Type &object)
 Determines if an object is an ActivityHost.
 
static bool isActivityHostMetaclass (const Metaclass *metaclass)
 Checks whether the given Metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Static Public Attributes

Messages
static MessageType< ActivationMessageArgumentsActivateActivityMessage
 You can send ActivateActivity to the Activity Host to activate an Activity.
 
static MessageType< ActivationMessageArgumentsDeactivateActivityMessage
 You can send DeactivateActivity to the Activity Host to deactivate an Activity.
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabAttachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated.
 
static MessageType< ActivityPrefabMessageArgumentsActivityPrefabDetachedMessage
 An Activity Host sends this message when it attaches the prefab of the Activity that is activated.
 
Internal Messages
static MessageType< RegisterActivityElementInternalMessageArgumentsRegisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to register the Activity Host in the parent.
 
static MessageType< UnregisterActivityElementInternalMessageArgumentsUnregisterHostInternalMessage
 Internal message sent by an Activity Host to its parent Activity or Activity Host to unregister the Activity Host from the parent.
 

Detailed Description

Base class for Activity Host classes.

This class defines common types, properties and messages for Activity Host classes.

See also
ExclusiveActivityHost2D, ExclusiveActivityHost3D, ParallelActivityHost2D, ParallelActivityHost3D.

Member Typedef Documentation

◆ ActivityInfoContainer

Member Enumeration Documentation

◆ ActivationStatus

Specifies possible stages for internal tracking of activation of an Activity.

Enumerator
PreparingForActivation 

The Activity is preparing for the activation sequence.

For example, resources can be loaded at this stage.

ParallelAnimation 

The Activity is in animation stage parallel to another Activity.

ExclusiveAnimation 

The Activity is in exclusive animation stage.

◆ DeactivationStatus

Specifies possible stages for internal tracking of deactivation of an Activity.

Enumerator
ExclusiveAnimation 

The Activity is in exclusive animation stage.

ParallelAnimation 

The Activity is in animation stage parallel to another Activity.

WaitingForRelease 

The Activity has finished all possible actions during the deactivation.

Constructor & Destructor Documentation

◆ ~ActivityHostConcept()

virtual kanzi::ActivityHostConcept::~ActivityHostConcept ( )
virtualdefault

Destructor.

Member Function Documentation

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::ActivityHostConcept::makeEditorInfo ( )
static

◆ isActivityHost()

template<typename Type >
static bool kanzi::ActivityHostConcept::isActivityHost ( const Type & object)
inlinestatic

Determines if an object is an ActivityHost.

Parameters
objectObject to test.
Returns
Returns true if the object is an ActivityHost, false otherwise.

◆ isActivityHostMetaclass()

static bool kanzi::ActivityHostConcept::isActivityHostMetaclass ( const Metaclass * metaclass)
inlinestatic

Checks whether the given Metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass.

Parameters
metaclassThe metaclass to check.
Returns
If the given metaclass is an ActivityHostConcept metaclass or contains it as a mixin metaclass, returns true, otherwise false.
Since
Kanzi 3.9.4

◆ setActivationModifier()

virtual void kanzi::ActivityHostConcept::setActivationModifier ( string_view activityName,
BindingTokenWeakPtr weakModifier )
pure virtual

Sets a property modifier to apply activation to a child Activity Node of an Activity Host.

The created modifier is a BindingToken for the property that keeps a child Activity node activated for as long as the token is alive. ApplyActivationAction uses this method to apply activation to an Activity Node, upon invocation.

For ParallelActivityHost:

For ExclusiveActivityHost:

Parameters
activityNameThe name of the Activity node that the ApplyActivationAction activates.
weakModifierA BindingToken owned by the ApplyActivationAction. For ParallelActivityHost, Kanzi waits until the child Activity node prefab is instantiated. Only after the prefab is instantiated can Kanzi set the property modifier binding on the child Activity node. For ExclusiveActivityHost Kanzi does not have to wait for prefab to instantiate because it sets the property modifier directly on the Activity Host and not on its child Activity nodes.
Since
Kanzi 3.9.0

Implemented in kanzi::ExclusiveActivityHostBaseImpl< TBaseClass, TDerivedClass >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, DataDrivenExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout2D, ExclusiveActivityHost2D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, DataDrivenExclusiveActivityHost3D >, kanzi::ExclusiveActivityHostBaseImpl< ContentLayout3D, ExclusiveActivityHost3D >, kanzi::ParallelActivityHostImpl< TBaseClass, TDerivedClass >, kanzi::ParallelActivityHostImpl< ContentLayout2D, ParallelActivityHost2D >, and kanzi::ParallelActivityHostImpl< ContentLayout3D, ParallelActivityHost3D >.

◆ onActivateActivityOverride()

◆ getActivatingNames()

◆ resolveFocusWithPolicy()

Member Data Documentation

◆ ActivateActivityMessage

MessageType<ActivationMessageArguments> kanzi::ActivityHostConcept::ActivateActivityMessage
static

You can send ActivateActivity to the Activity Host to activate an Activity.

Exclusive Activity Host deactivates the previously active Activity at the same time.

To activate an Activity in an Activity Host:

◆ DeactivateActivityMessage

MessageType<ActivationMessageArguments> kanzi::ActivityHostConcept::DeactivateActivityMessage
static

You can send DeactivateActivity to the Activity Host to deactivate an Activity.

Exclusive Activity Host ignores this message.

To deactivate an Activity in a Parallel Activity Host:

◆ ActivityPrefabAttachedMessage

MessageType<ActivityPrefabMessageArguments> kanzi::ActivityHostConcept::ActivityPrefabAttachedMessage
static

An Activity Host sends this message when it attaches the prefab of the Activity that is activated.

Since
Kanzi 3.9.1.

◆ ActivityPrefabDetachedMessage

MessageType<ActivityPrefabMessageArguments> kanzi::ActivityHostConcept::ActivityPrefabDetachedMessage
static

An Activity Host sends this message when it attaches the prefab of the Activity that is activated.

Since
Kanzi 3.9.1.

◆ RegisterHostInternalMessage

MessageType<RegisterActivityElementInternalMessageArguments> kanzi::ActivityHostConcept::RegisterHostInternalMessage
static

Internal message sent by an Activity Host to its parent Activity or Activity Host to register the Activity Host in the parent.

◆ UnregisterHostInternalMessage

MessageType<UnregisterActivityElementInternalMessageArguments> kanzi::ActivityHostConcept::UnregisterHostInternalMessage
static

Internal message sent by an Activity Host to its parent Activity or Activity Host to unregister the Activity Host from the parent.


The documentation for this class was generated from the following file: